package com.zmn.mcc.persistence.interfaces.permit;

import com.zmn.common.dto.StatusDTO;
import com.zmn.mcc.common.dto.permit.PermitLitDO;
import com.zmn.mcc.model.entity.permit.McPermit;
import com.zmn.mcc.model.entity.permit.McPermitQuery;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 10:51
 */
public interface PermitDao {

    McPermit findByKey(Integer permitId);

    List<McPermit> listPageByQuery(McPermitQuery query);

    List<McPermit> listByQuery(McPermitQuery query);

    List<PermitLitDO> listPermitLitByQuery(McPermitQuery query);

    Integer countByQuery(McPermitQuery query);


    Integer updateByKey(McPermit permit);

    Integer updateStatus(McPermit permit);
    Integer updateStatusBatch(StatusDTO dto);

    Integer updateSort(McPermit permit);


    Integer insert(McPermit permit);


    Integer deleteByKey(Integer permitId);
}
